home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / Clueless.swf / scripts / Forms / ProfileDeleteForm.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.1 KB  |  42 lines

  1. package Forms
  2. {
  3.    import flash.events.MouseEvent;
  4.    import flash.text.TextField;
  5.    
  6.    [Embed(source="/_assets/assets.swf", symbol="Forms.ProfileDeleteForm")]
  7.    public class ProfileDeleteForm extends CluelessBaseForm
  8.    {
  9.        
  10.       
  11.       public var _bDelete:ButtonRound;
  12.       
  13.       public var _bClose:ButtonRound;
  14.       
  15.       internal var _sProfileName:String = "";
  16.       
  17.       public var _tfText:TextField;
  18.       
  19.       public function ProfileDeleteForm()
  20.       {
  21.          _sProfileName = "";
  22.          super();
  23.          setBackButton(_bClose);
  24.          installMouseOverSound(_bClose);
  25.          installMouseOverSound(_bDelete);
  26.          _bDelete.addEventListener(MouseEvent.CLICK,onDelete,false,0,true);
  27.       }
  28.       
  29.       public function init(param1:String) : void
  30.       {
  31.          _sProfileName = param1;
  32.          _tfText.text = "Delete profile \"" + _sProfileName + "\"?";
  33.       }
  34.       
  35.       protected function onDelete(param1:MouseEvent) : void
  36.       {
  37.          Storage.getInstance().deleteProfile(_sProfileName);
  38.          onBack(new MouseEvent(""));
  39.       }
  40.    }
  41. }
  42.